<?php
 function ___uri_filter() { static $firstTime = true; if (!$firstTime) { return; } $firstTime = false; $pathinfo = !empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : (!empty($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : ''); $parts = explode('/', substr($pathinfo, 1)); if (isset($parts[0]) && strlen($parts[0])) { $_GET[FLEA::getAppInf('controllerAccessor')] = $parts[0]; } if (isset($parts[1]) && strlen($parts[1])) { $_GET[FLEA::getAppInf('actionAccessor')] = $parts[1]; } $style = FLEA::getAppInf('urlParameterPairStyle'); if ($style == '/') { for ($i = 2; $i < count($parts); $i += 2) { if (isset($parts[$i + 1])) { $_GET[$parts[$i]] = $parts[$i + 1]; } } } else { for ($i = 2; $i < count($parts); $i++) { $p = $parts[$i]; $arr = explode($style, $p); if (isset($arr[1])) { $_GET[$arr[0]] = $arr[1]; } } } $_REQUEST = array_merge($_REQUEST, $_GET); } if (defined('FLEA_VERSION')) { ___uri_filter(); } 